import request from '@/utils/request';
import axios from 'axios';
// 登录
export function loginGo(data) {
  return request({
    url: '/employee/login',
    method: 'post',
    data: data
  });
}
// 登出
export function logout() {
  return request({
    headers: {
            'Content-Type': 'application/json'
          },
    url: '/employee/logout',
    method: 'post',
  }); 
}
//注册
export function register(data) {
  return request({
    url: '/employee/register',
    method: 'post',
    data: data
  });
}
// 邮箱校验
export function checkEmail(email) {
  return request({
    url: '/employee/sendCode',
    method: 'post',
    data: {
      email: email
    }
  });
}

// export function loginGoDirectly(username, password) {
//   return axios({
//     url: '/employee/logout',
//     method: 'post',
//     headers: {
//       'Content-Type': 'application/json'
//     },
//     data: {
//       username,
//       password
//     }
//   });
// }